//
//  TPUIMacro.h
//  CloudAtCostPanel
//
//  Created by leonardo on 2017/2/9.
//  Copyright © 2017年 tanpengsccd. All rights reserved.
//

#ifndef TPUIMacro_h
#define TPUIMacro_h
//三方库
#import <Masonry.h>
#import "TPView.h"
//常用高度
#define STATUS_HEIGHT  [UIApplication sharedApplication].statusBarFrame.size.height
#define NAVI_HEIGHT  self.navigationController.navigationBar.bounds.size.height
#define SCREAN_WIDTH [UIScreen mainScreen].bounds.size.width
#define SCREAN_HEIGHT [UIScreen mainScreen].bounds.size.height
#define SCREAN_WIDTH_FIXED MIN(SCREAN_WIDTH, SCREAN_HEIGHT) //固定宽度
#define SCREAN_HEIGHT_FIXED MAX(SCREAN_WIDTH, SCREAN_HEIGHT) //固定高度

//Cell height
#define HEIGHT_CELL             PX(132)
#define HEIGHT_BTN_SMALL        PX(120)
#define HEIGHT_BTN_NORMAL       PX(132)
#define LENGTH_HUD              180
//margin widow
#define MARGIN_WINDOW   PX(60)
#define MARGIN_CELL     PX(60)
#define MARGIN_TEXT     PX(30)

//整体比例
#define PX(px) ((px) * SCREAN_WIDTH_FIXED /1242.0f)

//字体大小
#define FONTSIZE_TITLE      [UIFont systemFontOfSize:18]
#define FONTSIZE_CONTENT    [UIFont systemFontOfSize:14]
#define FONTSIZE_SUGGEST    [UIFont systemFontOfSize:8]



//颜色
//十六进制
#define HEX_COLOR(hexValue,a) [UIColor colorWithRed:((float)((hexValue & 0xFF0000) >> 16))/255.0 green:((float)((hexValue & 0xFF00) >> 8))/255.0 blue:((float)(hexValue & 0xFF))/255.0 alpha:a]
//RGB
#define RGB_COLOR(r,g,b,a) [UIColor colorWithRed:r/255.0 green:g/255.0 blue:b/255.0 alpha:a]

#define COLOUR_TITILE       HEX_COLOR(0x000000,1)
#define COLOUR_CONTENT      HEX_COLOR(0x666666,1)
#define COLOUR_SUGGEST      HEX_COLOR(0xCCCCCC,1)
#define COLOUR_PLACEHOLDER  HEX_COLOR(204,204,204,1)


#define COLOUR_BLUE     RGB_COLOR(0,100,200,1)
#define COLOUR_ORANGE   HEX_COLOR(0xFF9900,1)
#define COLOUR_RED      HEX_COLOR(0xCD0000,1)
#define COLOUR_GREEN    HEX_COLOR(0x1BC417,1)
#define COLOUR_WHITE    [UIColor whiteColor]
#define COLOUR_BLACK    HEX_COLOR(0x333333,1)
#define COLOUR_YELLOW   HEX_COLOR(0xFF9900,1)
#define COLOUR_PINK     HEX_COLOR(0xE57F7F,1)
#define COLOUR_GRAY     HEX_COLOR(0x808080,1)

#define COLOUR_BACKGROUND           RGB_COLOR(45,45,45,1)
#define COLOUR_BACKGROUND_LIGHT     RGB_COLOR(245,245,245,1)
#define COLOUR_LINE                 HEX_COLOR(221,221,221)
#define COLOUR_DARK_BACKGROUND      RGB_COLOR(0,0,0,0.8)
#define COLOUR_TRANSLUCENT          RGB_COLOR(0,0,0,0)
#define COLOUR_SOLID                RGB_COLOR(230,230,230,1)

//圆角
#define CORNER_RADIUS   PX(24)


//助记
#define TOUCHIDLOGIN @"TOUCHIDLOGIN"


#endif /* TPUIMacro_h */
